import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule, ErrorHandler, LOCALE_ID } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { IconDefinition } from '@ant-design/icons-angular';
import { AccountBookFill, AlertFill, AlertOutline } from '@ant-design/icons-angular/icons'
import { NgZorroAntdModule, NZ_I18N, zh_CN, NzIconService, NzCascaderModule  } from 'ng-zorro-antd';
import { AppComponent } from './app.component';
import { HttpModule } from '@angular/http';
import { HeaderComponent } from './components/header/header.component';
import { MenuComponent } from './components/menu/menu.component';
import { LoginComponent } from './login/login.component';
import { AppRoutingModule } from './app.routing';
import { LoginRouting } from './login/login.routing';
import { SalesmanageModule } from './salesmanage/salesmanage.module';
import { CustomErrorHandler } from '../kalend';
import { ManageModule } from './manage/manage.module';
import { SyssetModule } from './sysset/sysset.module';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { SchedulerModule } from '@progress/kendo-angular-scheduler';
import '@progress/kendo-angular-intl/locales/zh/all';


registerLocaleData(zh);
const icons: IconDefinition[] = [ AccountBookFill, AlertOutline, AlertFill ];
@NgModule({
  declarations: [
    AppComponent,
    HeaderComponent,
    MenuComponent,
    LoginComponent
  ],
  imports: [
    AppRoutingModule,
    BrowserModule,
    FormsModule,
    HttpClientModule,
    ReactiveFormsModule,
    BrowserAnimationsModule,
    /** 导入 ng-zorro-antd 模块 **/
    NgZorroAntdModule,
    LoginRouting,
    HttpModule,
    SalesmanageModule,
    ManageModule,
    SyssetModule,
    SchedulerModule
  ],
  bootstrap: [AppComponent],
  /** 配置 ng-zorro-antd 国际化 **/
  // providers: [{ provide: NZ_I18N, useValue: zh_CN }]
  providers: [{ provide: ErrorHandler, useClass: CustomErrorHandler},
    {
      provide: LOCALE_ID, useValue: 'zh'
    }
    // { provide: NZ_ICON_DEFAULT_TWOTONE_COLOR, useValue: '#00ff00' }, // 不提供的话，即为 Ant Design 的主题蓝色
    // { provide: NZ_ICONS, useValue: icons }
  ]
})
export class AppModule { }
